find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Network QUIET)
# find_package(Qt6 REQUIRED COMPONENTS LinguistTools)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(PROJECT_SOURCES
    autoupdatedialog.cpp
    autoupdatedialog.h
    frame.cpp
    frame.h
    label0.h    
    label1.h
    label2.h
    label3.h
    line2.h
    lineedit.cpp
    lineedit.h
    loadingframe.cpp
    loadingframe.h
    msgutils.cpp
    msgutils.h
    taskprogressdialog.cpp
    taskprogressdialog.h
    tasktimedialog.cpp
    tasktimedialog.h
    toastlabel.cpp
    toastlabel.h
    upgradedialog.cpp
    upgradedialog.h
)

add_library(Controls STATIC ${PROJECT_SOURCES})

target_compile_definitions(Controls PRIVATE
)

target_include_directories(Controls PRIVATE
    ${PROJECT_SOURCE_DIR}/src/libs
)

target_link_libraries(Controls PRIVATE
    Qt6::Core
    Qt6::Gui
    Qt6::Widgets
    Qt6::Network
)

# qt6_add_translations(Controls
#     TS_FILES controls_en_US.ts controls_zh_CN.ts
#     QM_FILES_OUTPUT_VARIABLE qm_files
#     # LUPDATE_OPTIONS -no-obsolete
# )
